package com.ruoyi.web.pgci.mapper;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.web.pgci.domain.PgciSailors;
import com.ruoyi.web.pgci.vo.AnnualTrainingAnalysis;

import java.util.List;

/**
 * @author yyq
 * @create 2023-11-12
 * @description 船员Mapper接口
 */
public interface PgciSailorsMapper {

    /**
     * 查询船员
     *
     * @param userId 船员主键
     * @return 船员
     */
    public PgciSailors selectPgciSailorsByUserId(String userId);

    /**
     * 查询船员列表
     *
     * @param pgciSailors 船员
     * @return 船员集合
     */
    public List<PgciSailors> selectPgciSailorsList(PgciSailors pgciSailors);

    /**
     * 新增船员
     *
     * @param pgciSailors 船员
     * @return 结果
     */
    public int insertPgciSailors(PgciSailors pgciSailors);

    public int batchInsertPgciSailors(List<PgciSailors> list);


    /**
     * 修改船员
     *
     * @param pgciSailors 船员
     * @return 结果
     */
    public int updatePgciSailors(PgciSailors pgciSailors);

    public int batchUpdatePgciSailors(List<PgciSailors> list);

    /**
     * 删除船员
     *
     * @param userId 船员主键
     * @return 结果
     */
    public int deletePgciSailorsByUserId(String userId);

    /**
     * 批量删除船员
     *
     * @param userIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePgciSailorsByUserIds(String[] userIds);

    /**
     * 根据岗位查询船员数
     * @param list
     * @return
     */
    public long selectCountSailorsByRanks(List<String> list);

    public List<String> selectSailorShipGroupBy();

    public long selectSailorCountByLastInstallation(String lastInstallation);

    public List<AnnualTrainingAnalysis> selectAnnualTrainingAnalysis();
}
